package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamPeopleMapper;
import com.ruoyi.exam.domain.ExamPeople;
import com.ruoyi.exam.service.IExamPeopleService;

/**
 * 考试人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-01
 */
@Service
public class ExamPeopleServiceImpl implements IExamPeopleService 
{
    @Autowired
    private ExamPeopleMapper examPeopleMapper;

    /**
     * 查询考试人员
     * 
     * @param id 考试人员主键
     * @return 考试人员
     */
    @Override
    public ExamPeople selectExamPeopleById(Long id)
    {
        return examPeopleMapper.selectExamPeopleById(id);
    }

    /**
     * 查询考试人员列表
     * 
     * @param examPeople 考试人员
     * @return 考试人员
     */
    @Override
    public List<ExamPeople> selectExamPeopleList(ExamPeople examPeople)
    {
        return examPeopleMapper.selectExamPeopleList(examPeople);
    }

    /**
     * 新增考试人员
     * 
     * @param examPeople 考试人员
     * @return 结果
     */
    @Override
    public int insertExamPeople(ExamPeople examPeople)
    {
        examPeople.setCreateTime(DateUtils.getNowDate());
        return examPeopleMapper.insertExamPeople(examPeople);
    }

    /**
     * 修改考试人员
     * 
     * @param examPeople 考试人员
     * @return 结果
     */
    @Override
    public int updateExamPeople(ExamPeople examPeople)
    {
        examPeople.setUpdateTime(DateUtils.getNowDate());
        return examPeopleMapper.updateExamPeople(examPeople);
    }

    /**
     * 批量删除考试人员
     * 
     * @param ids 需要删除的考试人员主键
     * @return 结果
     */
    @Override
    public int deleteExamPeopleByIds(Long[] ids)
    {
        return examPeopleMapper.deleteExamPeopleByIds(ids);
    }

    /**
     * 删除考试人员信息
     * 
     * @param id 考试人员主键
     * @return 结果
     */
    @Override
    public int deleteExamPeopleById(Long id)
    {
        return examPeopleMapper.deleteExamPeopleById(id);
    }
}
